package boogie;

import boogie.game.Game;
import boogie.game.GameState;
import java.awt.Color;
import java.awt.Graphics2D;

/**
 *
 * @author Boogie
 */
public class TestState extends GameState{

    public TestState(Game game) {
        super("test");
        
    }

    @Override
    public void onInit() {
        System.out.println("test1 init");
    }
    private int x=600,y=600;
    @Override
    public void onUpdate() {
        x--;y--;
    }

    @Override
    public void onDraw(Graphics2D g) {
        super.onDraw(g);
        g.setColor(Color.red);
        g.fillRect(x,y, 100, 100);
    }

    @Override
    public void onPause() {
        System.out.println("test on pause");
    }

    @Override
    public void onResume() {
        System.out.println("test on resume");
    }

    @Override
    public void drawBackgorund(Graphics2D g) {
        g.setColor(Color.BLUE);
        g.fillRect(0, 0, this.getGame().width,this.getGame().height);
    }
    
    
}
